package com.test;

import java.util.Calendar;

/**
 * Created by IntelliJ IDEA.
 * User: bj910
 * Date:2023-10-19
 * Time: 14:55
 * To change this template use File | Settings | File Templates.
 */
public class Demo02 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.getTime());
        calendar.add(Calendar.DAY_OF_MONTH,-2);
//        calendar.set(Calendar.HOUR_OF_DAY, 0);
//        calendar.set(Calendar.MINUTE, 0);
//        calendar.set(Calendar.SECOND, 0);

        System.out.println(calendar.getTime());
    }
}
